package com.tm.media.login.controller;

import com.tm.media.utils.utils.Result;
import com.tm.media.login.service.IAdRoleService;
import com.tm.media.model.dtos.ResponseResult;
import com.tm.media.model.entity.AdRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 角色信息Controller
 *
 * @author ruoyi
 * @date 2023-02-12
 */
@RestController
@CrossOrigin
@RequestMapping("system/role")
public class AdRoleController {
    @Autowired
    private IAdRoleService adRoleService;
    @GetMapping("list")
    public ResponseResult selectList(Long pageNum, Long pageSize){
        return adRoleService.selectList(pageNum,pageSize);
    }
    @PostMapping("addRole")
    public Result addRole(@RequestBody AdRole adRole) {
        return adRoleService.addRole(adRole);
    }
}
